package com.zz.cinema.domain;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name = "TS_admin")
public class TS_Admin {

	/**
	 * create sequence SEQ_TS_ADMIN 
	 * minvalue 100 
	 * maxvalue 999 
	 * start with 100
	 * increment by 1
	 * cache 20;
	 */
	/**
	 * Oracle Sequence 在Hibernate 5 起效果
	 */
	@Id
	@GeneratedValue(generator = "sequenceGenerator_TS_admin", strategy = GenerationType.SEQUENCE)
	@SequenceGenerator(name = "sequenceGenerator_TS_admin", sequenceName = "SEQ_TS_ADMIN", initialValue = 100, allocationSize = 1)
	private int aid;

	private String adminName;
	private String password;
	private Date createTime;
	private String avatar;
	private String email;

	public TS_Admin() {

	}

	public TS_Admin(String adminName, String password, Date createTime, String avatar, String email) {
		this.adminName = adminName;
		this.password = password;
		this.createTime = createTime;
		this.avatar = avatar;
		this.email = email;
	}

	public int getAid() {
		return aid;
	}

	public void setAid(int aid) {
		this.aid = aid;
	}

	public String getAdminName() {
		return adminName;
	}

	public void setAdminName(String adminName) {
		this.adminName = adminName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Override
	public String toString() {
		return "TS_admin [aid=" + aid + ", adminName=" + adminName + ", password=" + password + ", createTime="
				+ createTime + ", avatar=" + avatar + ", email=" + email + "]";
	}

}
